package com.starbaba.base.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.base.common.exception.AppException;
import com.base.common.log.LogService;
import com.starbaba.base.dao.LoanManagerBaseDao;
import com.starbaba.base.service.RegisterRecommendActivityService;
import com.tuanzi.server.loan_base.model.db.activity.RegisterRecommendActivity;

public class RegisterRecommendActivityServiceImpl extends LoanManagerBaseDao implements RegisterRecommendActivityService{
	

	@Override
	public Map<String, String> getRegisterRecommendActivityMap() {
		
		Map<String, String> map = new HashMap<String, String>();
		
		try {
			String sql = "SELECT * FROM `register_recommend_activity`";
			List<RegisterRecommendActivity> list = getDao().list(sql, RegisterRecommendActivity.class);
			if(list != null && list.size() > 0){
				
				for(RegisterRecommendActivity activity: list){
					map.put(activity.getActivity_type(), activity.getActivity_type_name());
				}
				
			}
			
		} catch (AppException e) {
			LogService.error(e);
		}
		
		return map;
	}
	

}
